import { Layout, Menu } from "antd";
import { Route, Link } from "react-router-dom";
import ServerTestApp from "../servertest/app";
import MockTest from "../mock/app"

const { Sider, Content } = Layout;

export default function TestApp() {
    return (
        <Layout
            style={{
                width: "90%",
                margin: "20px auto",
                minHeight: 800
            }}
        >
            <Sider width={250}>
                <div style={{ display: "flex", flexDirection: "column", height: "100%" }}>
                    <div style={{ height: 60, backgroundColor: "#fff" }}></div>
                    <Menu
                        defaultSelectedKeys={["server"]}
                        style={{ flexGrow: 1, width: "100%" }}
                    >
                        <Menu.Item key="server"><Link to="/index/project/test/servertest/testset">接口测试</Link></Menu.Item>
                        <Menu.Item key="mock"><Link to="/index/project/test/mock">Mock</Link></Menu.Item>
                    </Menu>
                </div>

            </Sider>
            <Content>
                <Route path="/index/project/test/servertest" component={ServerTestApp}></Route>
                <Route path="/index/project/test/mock" component={MockTest}></Route>
            </Content>
        </Layout>
    )

}